package reduce.fz.com.reduce.activity;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;

import reduce.fz.com.reduce.R;
import reduce.fz.com.reduce.custom.TabIndicator;

public abstract class BaseToolBarWithTabActivity extends BaseToolBarActivity {
    //tab
    public TabIndicator tabIndicator;
    public TextView rightButton;
    public TabIndicator currentTab;

    /**
     * 将tab添加到toolbar上
     *
     * @param tab
     */
    protected void showToobarTab(TabIndicator tab) {
        //如果当前存在tab需要先清除掉旧的
        if (currentTab != null)
            mToolbar.removeView(tab);

        mToolbar.addView(tab);
        currentTab = tab;
    }


}
